package com.wsj.aop.customize;

import com.wsj.domain.User;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.lang.Nullable;
import org.springframework.stereotype.Component;

@Component
public class CustomizeFactoryBean implements FactoryBean {

  @Nullable
  @Override
  public Object getObject() throws Exception {
    User user = new User();
    user.setUserName("任盈盈");
    return user;
  }

  @Nullable
  @Override
  public Class<?> getObjectType() {
    return User.class;
  }
}
